package com.le.tester.imooc.oldimmortal.coding.annotation;

import com.le.tester.imooc.oldimmortal.coding.proxy.IOrder;

import java.util.concurrent.TimeUnit;

/**
 * createTime：2025-05-19 14:41
 * description：模拟订单业务逻辑
 */
//使用切面的注解
@Aspect(type = TimeUsageAspect.class)
public class Order implements IOrder {

    int status = 0;


    @Override
    public void pay() throws InterruptedException {
        TimeUnit.MILLISECONDS.sleep(50);
        this.status = 1;
    }

    @Override
    public void show() {
        System.out.println("current order status:" + this.status);
    }
}
